<!DOCTYPE html><html lang="zh-CN" data-theme="light"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><title>linux安装oracle10G自启动实例监听 | Alexcld</title><meta name="keywords" content="linux安装oracle10G自启动实例监听"><meta name="author" content="Alex"><meta name="copyright" content="Alex"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="#ffffff"><meta name="description" content="安装环境:这里在vmware里虚拟的RHEL5，分配的内存1G，SWAP分区1G，建议最好把SWAP分区改成2G。否则安装时，到了测试的步骤会提示监测失败。（当然，如果你强行安装一样没问题） 安装Oracle 10g Release2 前的配置1. 首先挂在光盘，安装Oracle 10g R2所需的软件包1234567891011121314# mkdir &#x2F;mnt&#x2F;cdrom">
<meta property="og:type" content="article">
<meta property="og:title" content="linux安装oracle10G自启动实例监听">
<meta property="og:url" content="http://blogtest.alexcld.com/posts/6514.html">
<meta property="og:site_name" content="Alexcld">
<meta property="og:description" content="安装环境:这里在vmware里虚拟的RHEL5，分配的内存1G，SWAP分区1G，建议最好把SWAP分区改成2G。否则安装时，到了测试的步骤会提示监测失败。（当然，如果你强行安装一样没问题） 安装Oracle 10g Release2 前的配置1. 首先挂在光盘，安装Oracle 10g R2所需的软件包1234567891011121314# mkdir &#x2F;mnt&#x2F;cdrom">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://img.alexcld.com/img/001127-160683908746c3.jpg">
<meta property="article:published_time" content="2020-12-23T05:04:10.000Z">
<meta property="article:modified_time" content="2020-12-23T07:44:18.000Z">
<meta property="article:author" content="Alex">
<meta property="article:tag" content="linux安装oracle10G自启动实例监听">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://img.alexcld.com/img/001127-160683908746c3.jpg"><link rel="shortcut icon" href="https://img.alexcld.com/img/author.png"><link rel="canonical" href="http://blogtest.alexcld.com/posts/6514"><link rel="preconnect" href="//cdn.jsdelivr.net"/><link rel="preconnect" href="//hm.baidu.com"/><link rel="preconnect" href="//fonts.googleapis.com" crossorigin=""/><link rel="preconnect" href="//busuanzi.ibruce.info"/><link rel="stylesheet" href="/css/index.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free/css/all.min.css" media="print" onload="this.media='all'"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/node-snackbar/dist/snackbar.min.css" media="print" onload="this.media='all'"><script>var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "https://hm.baidu.com/hm.js?ed29f24d552b68e914260fcff2860767";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();
</script><link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Titillium+Web&amp;display=swap" media="print" onload="this.media='all'"><script>const GLOBAL_CONFIG = { 
  root: '/',
  algolia: undefined,
  localSearch: {"path":"search.xml","languages":{"hits_empty":"找不到您查询的内容：${query}"}},
  translate: {"defaultEncoding":2,"translateDelay":0,"msgToTraditionalChinese":"繁","msgToSimplifiedChinese":"簡"},
  noticeOutdate: undefined,
  highlight: {"plugin":"highlighjs","highlightCopy":true,"highlightLang":true,"highlightHeightLimit":false},
  copy: {
    success: '复制成功',
    error: '复制错误',
    noSupport: '浏览器不支持'
  },
  relativeDate: {
    homepage: false,
    post: false
  },
  runtime: '天',
  date_suffix: {
    just: '刚刚',
    min: '分钟前',
    hour: '小时前',
    day: '天前',
    month: '个月前'
  },
  copyright: undefined,
  lightbox: 'fancybox',
  Snackbar: {"chs_to_cht":"你已切换为繁体","cht_to_chs":"你已切换为简体","day_to_night":"你已切换为深色模式","night_to_day":"你已切换为浅色模式","bgLight":"#49b1f5","bgDark":"#121212","position":"bottom-left"},
  source: {
    jQuery: 'https://cdn.jsdelivr.net/npm/jquery@latest/dist/jquery.min.js',
    justifiedGallery: {
      js: 'https://cdn.jsdelivr.net/npm/justifiedGallery/dist/js/jquery.justifiedGallery.min.js',
      css: 'https://cdn.jsdelivr.net/npm/justifiedGallery/dist/css/justifiedGallery.min.css'
    },
    fancybox: {
      js: 'https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@latest/dist/jquery.fancybox.min.js',
      css: 'https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@latest/dist/jquery.fancybox.min.css'
    }
  },
  isPhotoFigcaption: false,
  islazyload: false,
  isanchor: false
}</script><script id="config-diff">var GLOBAL_CONFIG_SITE = {
  title: 'linux安装oracle10G自启动实例监听',
  isPost: true,
  isHome: false,
  isHighlightShrink: false,
  isToc: true,
  postUpdate: '2020-12-23 15:44:18'
}</script><noscript><style type="text/css">
  #nav {
    opacity: 1
  }
  .justified-gallery img {
    opacity: 1
  }

  #recent-posts time,
  #post-meta time {
    display: inline !important
  }
</style></noscript><script>(win=>{
    win.saveToLocal = {
      set: function setWithExpiry(key, value, ttl) {
        if (ttl === 0) return
        const now = new Date()
        const expiryDay = ttl * 86400000
        const item = {
          value: value,
          expiry: now.getTime() + expiryDay,
        }
        localStorage.setItem(key, JSON.stringify(item))
      },

      get: function getWithExpiry(key) {
        const itemStr = localStorage.getItem(key)

        if (!itemStr) {
          return undefined
        }
        const item = JSON.parse(itemStr)
        const now = new Date()

        if (now.getTime() > item.expiry) {
          localStorage.removeItem(key)
          return undefined
        }
        return item.value
      }
    }
  
    win.getScript = url => new Promise((resolve, reject) => {
      const script = document.createElement('script')
      script.src = url
      script.async = true
      script.onerror = reject
      script.onload = script.onreadystatechange = function() {
        const loadState = this.readyState
        if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
        script.onload = script.onreadystatechange = null
        resolve()
      }
      document.head.appendChild(script)
    })
  
      win.activateDarkMode = function () {
        document.documentElement.setAttribute('data-theme', 'dark')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#0d0d0d')
        }
      }
      win.activateLightMode = function () {
        document.documentElement.setAttribute('data-theme', 'light')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#ffffff')
        }
      }
      const t = saveToLocal.get('theme')
    
          const now = new Date()
          const hour = now.getHours()
          const isNight = hour <= 6 || hour >= 18
          if (t === undefined) isNight ? activateDarkMode() : activateLightMode()
          else if (t === 'light') activateLightMode()
          else activateDarkMode()
        
      const asideStatus = saveToLocal.get('aside-status')
      if (asideStatus !== undefined) {
        if (asideStatus === 'hide') {
          document.documentElement.classList.add('hide-aside')
        } else {
          document.documentElement.classList.remove('hide-aside')
        }
      }
    
    const detectApple = () => {
      if (GLOBAL_CONFIG_SITE.isHome && /iPad|iPhone|iPod|Macintosh/.test(navigator.userAgent)){
        document.documentElement.classList.add('apple')
      }
    }
    detectApple()
    })(window)</script><meta name="generator" content="Hexo 5.2.0"></head><body><div id="web_bg"></div><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="avatar-img is-center"><img src="https://img.alexcld.com/img/author.png" onerror="onerror=null;src='/img/friend_404.gif'" alt="avatar"/></div><div class="site-data"><div class="data-item is-center"><div class="data-item-link"><a href="/archives/"><div class="headline">文章</div><div class="length-num">29</div></a></div></div><div class="data-item is-center"><div class="data-item-link"><a href="/tags/"><div class="headline">标签</div><div class="length-num">29</div></a></div></div><div class="data-item is-center"><div class="data-item-link"><a href="/categories/"><div class="headline">分类</div><div class="length-num">11</div></a></div></div></div><hr/><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page" href="/archives/"><i class="fa-fw fas fa-archive"></i><span> 时间轴</span></a></div><div class="menus_item"><a class="site-page" href="/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></div><div class="menus_item"><a class="site-page" href="/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 分类</span></a></div><div class="menus_item"><a class="site-page" href="/download"><i class="fa-fw fa fa-download"></i><span> 下载</span></a></div><div class="menus_item"><a class="site-page" href="/movies/"><i class="fa-fw fas fa-video"></i><span> 追剧怪</span></a></div><div class="menus_item"><a class="site-page" href="/music/"><i class="fa-fw fas fa-music"></i><span> 音乐</span></a></div><div class="menus_item"><a class="site-page" href="/link/"><i class="fa-fw fas fa-link"></i><span> 友链</span></a></div><div class="menus_item"><a class="site-page" href="/about/"><i class="fa-fw fas fa-heart"></i><span> 博主</span></a></div></div></div></div><div class="post" id="body-wrap"><header class="post-bg" id="page-header" style="background-image: url('https://img.alexcld.com/img/001127-160683908746c3.jpg')"><nav id="nav"><span id="blog_name"><a id="site-name" href="/">Alexcld</a></span><div id="menus"><div id="search-button"><a class="site-page social-icon search"><i class="fas fa-search fa-fw"></i><span> 搜索</span></a></div><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page" href="/archives/"><i class="fa-fw fas fa-archive"></i><span> 时间轴</span></a></div><div class="menus_item"><a class="site-page" href="/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></div><div class="menus_item"><a class="site-page" href="/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 分类</span></a></div><div class="menus_item"><a class="site-page" href="/download"><i class="fa-fw fa fa-download"></i><span> 下载</span></a></div><div class="menus_item"><a class="site-page" href="/movies/"><i class="fa-fw fas fa-video"></i><span> 追剧怪</span></a></div><div class="menus_item"><a class="site-page" href="/music/"><i class="fa-fw fas fa-music"></i><span> 音乐</span></a></div><div class="menus_item"><a class="site-page" href="/link/"><i class="fa-fw fas fa-link"></i><span> 友链</span></a></div><div class="menus_item"><a class="site-page" href="/about/"><i class="fa-fw fas fa-heart"></i><span> 博主</span></a></div></div><div id="toggle-menu"><a class="site-page"><i class="fas fa-bars fa-fw"></i></a></div></div></nav><div id="post-info"><h1 class="post-title">linux安装oracle10G自启动实例监听</h1><div id="post-meta"><div class="meta-firstline"><span class="post-meta-date"><i class="far fa-calendar-alt fa-fw post-meta-icon"></i><span class="post-meta-label">发表于</span><time class="post-meta-date-created" datetime="2020-12-23T05:04:10.000Z" title="发表于 2020-12-23 13:04:10">2020-12-23</time><span class="post-meta-separator">|</span><i class="fas fa-history fa-fw post-meta-icon"></i><span class="post-meta-label">更新于</span><time class="post-meta-date-updated" datetime="2020-12-23T07:44:18.000Z" title="更新于 2020-12-23 15:44:18">2020-12-23</time></span></div><div class="meta-secondline"><span class="post-meta-separator">|</span><span class="post-meta-wordcount"><i class="far fa-file-word fa-fw post-meta-icon"></i><span class="post-meta-label">字数总计:</span><span class="word-count">1.5k</span><span class="post-meta-separator">|</span><i class="far fa-clock fa-fw post-meta-icon"></i><span class="post-meta-label">阅读时长:</span><span>6分钟</span></span></div></div></div></header><main class="layout" id="content-inner"><div id="post"><article class="post-content" id="article-container"><p>安装环境:<br>这里在vmware里虚拟的RHEL5，分配的内存1G，SWAP分区1G，建议最好把SWAP分区改成2G。否则安装时，到了测试的步骤会提示监测失败。（当然，如果你强行安装一样没问题）</p>
<h3 id="安装Oracle-10g-Release2-前的配置"><a href="#安装Oracle-10g-Release2-前的配置" class="headerlink" title="安装Oracle 10g Release2 前的配置"></a>安装Oracle 10g Release2 前的配置</h3><h5 id="1-首先挂在光盘，安装Oracle-10g-R2所需的软件包"><a href="#1-首先挂在光盘，安装Oracle-10g-R2所需的软件包" class="headerlink" title="1. 首先挂在光盘，安装Oracle 10g R2所需的软件包"></a>1. 首先挂在光盘，安装Oracle 10g R2所需的软件包</h5><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br></pre></td><td class="code"><pre><span class="line"># mkdir &#x2F;mnt&#x2F;cdrom</span><br><span class="line"># mount &#x2F;dev&#x2F;cdrom &#x2F;mnt&#x2F;cdrom</span><br><span class="line"># cd &#x2F;mnt&#x2F;cdrom&#x2F;Server&#x2F;</span><br><span class="line"># rpm -Uvh setarch-2*</span><br><span class="line"># rpm -Uvh make-3*</span><br><span class="line"># rpm -Uvh glibc-2*</span><br><span class="line"># rpm -Uvh libaio-0*</span><br><span class="line"># rpm -Uvh compat-libstdc++-33-3*</span><br><span class="line"># rpm -Uvh compat-gcc-34-3*</span><br><span class="line"># rpm -Uvh compat-gcc-34-c++-3*</span><br><span class="line"># rpm -Uvh gcc-4*</span><br><span class="line"># rpm -Uvh libXp-1*</span><br><span class="line"># rpm -Uvh openmotif22-*</span><br><span class="line"># rpm -Uvh compat-db-4*</span><br></pre></td></tr></table></figure>
<p>其中除了openmotif22-2.2.3-18和compat-db-4.2.52-5.1在第三张盘上，其余的包都在第一张盘上。</p>
<h5 id="2-修改-etc-redhat-release文件"><a href="#2-修改-etc-redhat-release文件" class="headerlink" title="2.修改/etc/redhat-release文件"></a>2.修改/etc/redhat-release文件</h5><p>因为Oracle 10g官方只支持到RHEL4为止，所以需要更改版本说明，编辑/etc/redhat-release文件,删除Red Hat Enterprise Linux Server release 5 (Tikanga)，改为redhat-4</p>
<h5 id="3-修改内核参数"><a href="#3-修改内核参数" class="headerlink" title="3.修改内核参数"></a>3.修改内核参数</h5><p>#vim /etc/sysctl.conf</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line">kernel.shmmni &#x3D; 4096</span><br><span class="line">kernel.sem &#x3D; 250 32000 100 128</span><br><span class="line">fs.file-max &#x3D; 65536</span><br><span class="line">net.ipv4.ip_local_port_range &#x3D; 1024 65000</span><br><span class="line">net.core.rmem_default&#x3D;262144</span><br><span class="line">net.core.rmem_max&#x3D;262144</span><br><span class="line">net.core.wmem_default&#x3D;262144</span><br><span class="line">net.core.wmem_max&#x3D;262144</span><br></pre></td></tr></table></figure>
<p>使更改立即生效，使用下面的命令：</p>
<p>#sysctl -p</p>
<h5 id="4-建立安装Oracle需要的用户，组，及目录"><a href="#4-建立安装Oracle需要的用户，组，及目录" class="headerlink" title="4.建立安装Oracle需要的用户，组，及目录"></a>4.建立安装Oracle需要的用户，组，及目录</h5><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line">#groupadd oinstall</span><br><span class="line">#groupadd dba</span><br><span class="line">#groupadd oper</span><br><span class="line">#useradd -g oinstall -G dba oracle</span><br><span class="line">#passwd oracle</span><br><span class="line"></span><br><span class="line">#mkdir &#x2F;oracle</span><br><span class="line">#chown -R oracle:oinstall &#x2F;oracle</span><br><span class="line">#chmod -R 775 &#x2F;oracle</span><br></pre></td></tr></table></figure>
<p>安装oracle的目录建议安装在一个单独的分区或者磁盘上。</p>
<h5 id="5-设置oracle用户的shell-limit"><a href="#5-设置oracle用户的shell-limit" class="headerlink" title="5.设置oracle用户的shell limit"></a>5.设置oracle用户的shell limit</h5><p>#vi /etc/security/limits.conf    </p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">oracle soft nproc 2047</span><br><span class="line">oracle hard nproc 16384</span><br><span class="line">oracle soft nofile 1024</span><br><span class="line">oracle hard nofile 65536</span><br></pre></td></tr></table></figure>
<p>接下来更改/etc/pam.d/login文件，添加下面的内容，使shell limit生效：</p>
<p>#vi /etc/pam.d/login</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">session                  required                pam_limits.so</span><br></pre></td></tr></table></figure>
<h5 id="6-配置IP地址"><a href="#6-配置IP地址" class="headerlink" title="6.配置IP地址"></a>6.配置IP地址</h5><p>安装RHEL的时候最好采用静态IP地址，如果当时选择的是DHCP，现在需要更改/etc/sysconfig/network-scripts/ifcfg-eth0文件</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line">[root@TSM54-Test network-scripts]# cat ifcfg-eth0</span><br><span class="line"># Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE]</span><br><span class="line">DEVICE&#x3D;eth0</span><br><span class="line">BOOTPROTO&#x3D;static</span><br><span class="line">HWADDR&#x3D;00:0C:29:4B:17:C4</span><br><span class="line">ONBOOT&#x3D;yes</span><br><span class="line">IPADDR&#x3D;192.168.68.98</span><br><span class="line">NETMASK&#x3D;255.255.255.0</span><br><span class="line">GATEWAY&#x3D;192.168.68.10</span><br></pre></td></tr></table></figure>
<h5 id="7-配置oracle用户的环境变量"><a href="#7-配置oracle用户的环境变量" class="headerlink" title="7.配置oracle用户的环境变量"></a>7.配置oracle用户的环境变量</h5><p>下面的操作，该用oracle用户登陆执行了。</p>
<p>为了防止安装oracle时出现乱码，先把语言环境改为英文,在终端里输入:</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">[oracle@TSM54-TEST ~]$export LC_CTYPE&#x3D;en_US.UTF-8</span><br></pre></td></tr></table></figure>
<p>接下来，编辑/home/oracle目录下的.bash_profile文件，添加如下内容：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br></pre></td><td class="code"><pre><span class="line">export ORACLE_BASE&#x3D;&#x2F;oracle</span><br><span class="line">export ORACLE_HOME&#x3D;$ORACLE_BASE&#x2F;product&#x2F;10.2.0&#x2F;db_1</span><br><span class="line">export ORACLE_SID&#x3D;orcl</span><br><span class="line">export PATH&#x3D;$PATH:$ORACLE_HOME&#x2F;bin</span><br><span class="line">export LD_LIBRARY_PATH&#x3D;$ORACLE_HOME&#x2F;lib:&#x2F;lib:&#x2F;usr&#x2F;lib</span><br><span class="line">CLASSPATH&#x3D;$ORACLE_HOME&#x2F;JRE:$ORACLE_HOME&#x2F;jlib:$ORACLE_HOME&#x2F;rdbms&#x2F;jlib</span><br><span class="line">export CLASSPATH</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">if [ $USER &#x3D; &quot;oracle&quot; ]; then</span><br><span class="line">        if [ $SHELL &#x3D; &quot;&#x2F;bin&#x2F;ksh&quot; ]; then</span><br><span class="line">                ulimit -p 16384</span><br><span class="line">                ulimit -n 65536</span><br><span class="line">        else</span><br><span class="line">                ulimit -u 16384 -n 65536</span><br><span class="line">        fi</span><br><span class="line">fi</span><br></pre></td></tr></table></figure>
<h3 id="可以用oracle用户登陆进入系统安装，或者用第三方工具xmanager"><a href="#可以用oracle用户登陆进入系统安装，或者用第三方工具xmanager" class="headerlink" title="可以用oracle用户登陆进入系统安装，或者用第三方工具xmanager"></a>可以用oracle用户登陆进入系统安装，或者用第三方工具xmanager</h3><h5 id="然后安装Xmanager-启动Xstart-在HOST填写LINUX的IP地址，选择SSH协议，用户名和密码与LINUX登陆一样，选择用户界面，在Command-下选择GNOME-我的是GNOME-，最后RUN，然后打开Xshell-就能够远程控制LINUX了"><a href="#然后安装Xmanager-启动Xstart-在HOST填写LINUX的IP地址，选择SSH协议，用户名和密码与LINUX登陆一样，选择用户界面，在Command-下选择GNOME-我的是GNOME-，最后RUN，然后打开Xshell-就能够远程控制LINUX了" class="headerlink" title="然后安装Xmanager,启动Xstart 在HOST填写LINUX的IP地址，选择SSH协议，用户名和密码与LINUX登陆一样，选择用户界面，在Command 下选择GNOME  我的是GNOME ，最后RUN，然后打开Xshell 就能够远程控制LINUX了"></a>然后安装Xmanager,启动Xstart 在HOST填写LINUX的IP地址，选择SSH协议，用户名和密码与LINUX登陆一样，选择用户界面，在Command 下选择GNOME  我的是GNOME ，最后RUN，然后打开Xshell 就能够远程控制LINUX了</h5><h3 id="安装Oracle-10g"><a href="#安装Oracle-10g" class="headerlink" title="安装Oracle 10g"></a>安装Oracle 10g</h3><p>我把10201_database_linux32.zip放在/opt目录下，并通过</p>
<p>#unzip 10201_database_linux32.zip解压，现在使用oracle用户到/opt/database目录下执行安装:</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">[oracle@TSM54-Test opt]$ cd &#x2F;opt&#x2F;database&#x2F;</span><br><span class="line">[oracle@TSM54-Test database]$ ls</span><br><span class="line">doc install response runInstaller stage welcome.html</span><br><span class="line">[oracle@TSM54-Test database]$ .&#x2F;runInstaller</span><br></pre></td></tr></table></figure>
<p>然后根据自己真实环境通过图形化界面安装oracle10g<br>这里暂时不做多余说明，后续会将图放上来</p>
<h3 id="数据库的启动"><a href="#数据库的启动" class="headerlink" title="数据库的启动"></a>数据库的启动</h3><p>启动过程分为：启动实例、由实例装载数据库、打开数据库<br>SQL&gt; startup nomount<br>只启动实例</p>
<p>SQL&gt; startup mount<br>启动实例，并加载数据库，但不打开数据库</p>
<p>SQL&gt; startup<br>启动实例、由实例装载数据库、打开数据库</p>
<p>SQL&gt; alter database mount;<br>如果使用startup nomount启动实例，可以用此命令加载数据库，但不会启动数据库</p>
<p>SQL&gt; alter database open;<br>如果当前处于数据库已加载状态，可以使用此命令打开数据库</p>
<p>9：关闭数据库<br>SQL&gt; shutdown normal<br>等同于直接使用shutdown命令，</p>
<p>SQL&gt; shutdown immediate</p>
<p>SQL&gt; shutdown transactional</p>
<p>SQL&gt; shutdown abort</p>
<p>10：启动与关闭监听<br>[oracle@oracle ~]$ lsnrctl start</p>
<p>[oracle@oracle ~]$ lsnrctl stop</p>
<p>[oracle@oracle ~]$ lsnrctl </p>
<p>LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 03-8月 -2018 05:08:52</p>
<p>Copyright (c) 1991, 2016, Oracle.  All rights reserved.</p>
<p>欢迎来到LSNRCTL, 请键入”help”以获得信息。</p>
<p>LSNRCTL&gt; </p>
<h3 id="配置oracle开机自启动实例，监听"><a href="#配置oracle开机自启动实例，监听" class="headerlink" title="配置oracle开机自启动实例，监听"></a>配置oracle开机自启动实例，监听</h3><p>1.修改/etc/oratab文件，将N改为Y即可</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">#vim &#x2F;etc&#x2F;oratab</span><br><span class="line">#game:&#x2F;u01&#x2F;app&#x2F;oracle&#x2F;product&#x2F;10.2.0&#x2F;db_1:Y</span><br><span class="line">--格式：$ORACLE_SID:$ORACLE_HOME:&lt;N|Y&gt;   </span><br><span class="line">--&lt;N|Y&gt;选项代表开机是否自启动</span><br><span class="line">--game:&#x2F;u01&#x2F;app&#x2F;oracle&#x2F;product&#x2F;10.2.0&#x2F;db_1:N   --dbca创建库时注册的默认信息</span><br></pre></td></tr></table></figure>
<p>2.确认dbstart文件</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">#cd $ORACLE_HOME&#x2F;bin</span><br><span class="line">#ls -ll | grep dbstart</span><br><span class="line">#vim dbstart</span><br><span class="line">--dbstart为开机自启动脚本，让系统开机就去执行dbstart脚本文件，它会去读oratab文件，读到Y就会把对应的实例开机自启动</span><br><span class="line"></span><br><span class="line">--调整或确认监听路径，如ORACLE_HOME_LISTNER&#x3D;&#x2F;ade&#x2F;vikrkuma_new&#x2F;oracle或ORACLE_HOME_LISTNER&#x3D;$ORACLE_HOME根据设置的监听调整路径</span><br></pre></td></tr></table></figure>
<p>3.编辑/etc/rc.d/rc.local</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">#vim &#x2F;etc&#x2F;rc.d&#x2F;rc.local #添加如下两行启动实例，启动监听</span><br><span class="line">su - oracle -c&quot;&#x2F;u01&#x2F;app&#x2F;oracle&#x2F;product&#x2F;10.2.0&#x2F;db_1&#x2F;bin&#x2F;dbstart&quot;</span><br><span class="line">su - oracle -c&quot;&#x2F;u01&#x2F;app&#x2F;oracle&#x2F;product&#x2F;10.2.0&#x2F;db_1&#x2F;bin&#x2F;lsnrctl start&quot;</span><br><span class="line">--命令中-c代表执行脚本，脚本dbstart中指定启动的实例，脚本lsnrctl中启动配置的监听</span><br></pre></td></tr></table></figure>
<p>小结：<br>linux下设置实例自启动有关脚本：</p>
<p>oratab：实例是否自启动的注册信息</p>
<p>dbstart：开机启动脚本文件会读取oratab信息</p>
<p>rc.local：开机后立即要做的文件</p>
<p>到此结束，愉快的开始oracle之旅</p>
<h4 id="数据库常用sql语句集合"><a href="#数据库常用sql语句集合" class="headerlink" title="数据库常用sql语句集合"></a><a target="_blank" rel="noopener" href="https://alexcld.com/posts/1651.html">数据库常用sql语句集合</a></h4><h3 id="解决oracle不能上下翻历史命令问题"><a href="#解决oracle不能上下翻历史命令问题" class="headerlink" title="解决oracle不能上下翻历史命令问题"></a><a target="_blank" rel="noopener" href="https://alexcld.com/posts/3246.html">解决oracle不能上下翻历史命令问题</a></h3></article><div class="post-copyright"><div class="post-copyright__author"><span class="post-copyright-meta">文章作者: </span><span class="post-copyright-info"><a href="mailto:undefined">Alex</a></span></div><div class="post-copyright__type"><span class="post-copyright-meta">文章链接: </span><span class="post-copyright-info"><a href="http://blogtest.alexcld.com/posts/6514.html">http://blogtest.alexcld.com/posts/6514.html</a></span></div><div class="post-copyright__notice"><span class="post-copyright-meta">版权声明: </span><span class="post-copyright-info">本博客所有文章除特别声明外，均采用 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" target="_blank">CC BY-NC-SA 4.0</a> 许可协议。转载请注明来自 <a href="http://blogtest.alexcld.com" target="_blank">Alexcld</a>！</span></div></div><div class="tag_share"><div class="post-meta__tag-list"><a class="post-meta__tags" href="/tags/linux%E5%AE%89%E8%A3%85oracle10G%E8%87%AA%E5%90%AF%E5%8A%A8%E5%AE%9E%E4%BE%8B%E7%9B%91%E5%90%AC/">linux安装oracle10G自启动实例监听</a></div><div class="post_share"><div class="social-share" data-image="https://img.alexcld.com/img/001127-160683908746c3.jpg" data-sites="facebook,twitter,wechat,weibo,qq"></div><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/social-share.js/dist/css/share.min.css" media="print" onload="this.media='all'"><script src="https://cdn.jsdelivr.net/npm/social-share.js/dist/js/social-share.min.js" defer></script></div></div><nav class="pagination-post" id="pagination"><div class="prev-post pull-left"><a href="/posts/8546.html"><img class="prev-cover" src="https://img.alexcld.com/img/230158-1592492518653b.jpg" onerror="onerror=null;src='/img/404.jpg'" alt="cover of previous post"><div class="pagination-info"><div class="label">上一篇</div><div class="prev_info">docker pull &amp; docker search 报错：index.docker.io i/o timeout</div></div></a></div><div class="next-post pull-right"><a href="/posts/1564.html"><img class="next-cover" src="https://img.alexcld.com/img/171302-1586077982d6cd.jpg" onerror="onerror=null;src='/img/404.jpg'" alt="cover of next post"><div class="pagination-info"><div class="label">下一篇</div><div class="next_info">hexo-butterfly使用aplayer加载音乐页面</div></div></a></div></nav><hr/><div id="post-comment"><div class="comment-head"><div class="comment-headline"><i class="fas fa-comments fa-fw"></i><span> 评论</span></div></div><div class="comment-wrap"><div><div class="vcomment" id="vcomment"></div></div></div></div></div><div class="aside-content" id="aside-content"><div class="card-widget card-info"><div class="is-center"><div class="avatar-img"><img src="https://img.alexcld.com/img/author.png" onerror="this.onerror=null;this.src='/img/friend_404.gif'" alt="avatar"/></div><div class="author-info__name">Alex</div><div class="author-info__description">children don't lie</div></div><div class="card-info-data"><div class="card-info-data-item is-center"><a href="/archives/"><div class="headline">文章</div><div class="length-num">29</div></a></div><div class="card-info-data-item is-center"><a href="/tags/"><div class="headline">标签</div><div class="length-num">29</div></a></div><div class="card-info-data-item is-center"><a href="/categories/"><div class="headline">分类</div><div class="length-num">11</div></a></div></div><a class="button--animated" id="card-info-btn" target="_blank" rel="noopener" href="https://github.com/alexclownfish"><i class="fab fa-github"></i><span>Follow Me</span></a><div class="card-info-social-icons is-center"><a class="social-icon" href="https://github.com/alexclownfish" target="_blank" title="Github"><i class="fab fa-github"></i></a><a class="social-icon" href="mailto:ywz0207@163.com" target="_blank" title="Email"><i class="fas fa-envelope"></i></a><a class="social-icon" href="https://vue.alexcld.com" target="_blank" title="vue站点"><i class="fab fa-vuejs"></i></a></div></div><div class="card-widget card-announcement"><div class="item-headline"><i class="fas fa-bullhorn card-announcement-animation"></i><span>公告</span></div><div class="announcement_content">This is AKA Alex,respect yeah</div></div><div class="sticky_layout"><div class="card-widget" id="card-toc"><div class="item-headline"><i class="fas fa-stream"></i><span>目录</span></div><div class="toc-content"><ol class="toc"><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%AE%89%E8%A3%85Oracle-10g-Release2-%E5%89%8D%E7%9A%84%E9%85%8D%E7%BD%AE"><span class="toc-number">1.</span> <span class="toc-text">安装Oracle 10g Release2 前的配置</span></a><ol class="toc-child"><li class="toc-item toc-level-5"><a class="toc-link" href="#1-%E9%A6%96%E5%85%88%E6%8C%82%E5%9C%A8%E5%85%89%E7%9B%98%EF%BC%8C%E5%AE%89%E8%A3%85Oracle-10g-R2%E6%89%80%E9%9C%80%E7%9A%84%E8%BD%AF%E4%BB%B6%E5%8C%85"><span class="toc-number">1.0.1.</span> <span class="toc-text">1. 首先挂在光盘，安装Oracle 10g R2所需的软件包</span></a></li><li class="toc-item toc-level-5"><a class="toc-link" href="#2-%E4%BF%AE%E6%94%B9-etc-redhat-release%E6%96%87%E4%BB%B6"><span class="toc-number">1.0.2.</span> <span class="toc-text">2.修改&#x2F;etc&#x2F;redhat-release文件</span></a></li><li class="toc-item toc-level-5"><a class="toc-link" href="#3-%E4%BF%AE%E6%94%B9%E5%86%85%E6%A0%B8%E5%8F%82%E6%95%B0"><span class="toc-number">1.0.3.</span> <span class="toc-text">3.修改内核参数</span></a></li><li class="toc-item toc-level-5"><a class="toc-link" href="#4-%E5%BB%BA%E7%AB%8B%E5%AE%89%E8%A3%85Oracle%E9%9C%80%E8%A6%81%E7%9A%84%E7%94%A8%E6%88%B7%EF%BC%8C%E7%BB%84%EF%BC%8C%E5%8F%8A%E7%9B%AE%E5%BD%95"><span class="toc-number">1.0.4.</span> <span class="toc-text">4.建立安装Oracle需要的用户，组，及目录</span></a></li><li class="toc-item toc-level-5"><a class="toc-link" href="#5-%E8%AE%BE%E7%BD%AEoracle%E7%94%A8%E6%88%B7%E7%9A%84shell-limit"><span class="toc-number">1.0.5.</span> <span class="toc-text">5.设置oracle用户的shell limit</span></a></li><li class="toc-item toc-level-5"><a class="toc-link" href="#6-%E9%85%8D%E7%BD%AEIP%E5%9C%B0%E5%9D%80"><span class="toc-number">1.0.6.</span> <span class="toc-text">6.配置IP地址</span></a></li><li class="toc-item toc-level-5"><a class="toc-link" href="#7-%E9%85%8D%E7%BD%AEoracle%E7%94%A8%E6%88%B7%E7%9A%84%E7%8E%AF%E5%A2%83%E5%8F%98%E9%87%8F"><span class="toc-number">1.0.7.</span> <span class="toc-text">7.配置oracle用户的环境变量</span></a></li></ol></li></ol></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%8F%AF%E4%BB%A5%E7%94%A8oracle%E7%94%A8%E6%88%B7%E7%99%BB%E9%99%86%E8%BF%9B%E5%85%A5%E7%B3%BB%E7%BB%9F%E5%AE%89%E8%A3%85%EF%BC%8C%E6%88%96%E8%80%85%E7%94%A8%E7%AC%AC%E4%B8%89%E6%96%B9%E5%B7%A5%E5%85%B7xmanager"><span class="toc-number">2.</span> <span class="toc-text">可以用oracle用户登陆进入系统安装，或者用第三方工具xmanager</span></a><ol class="toc-child"><li class="toc-item toc-level-5"><a class="toc-link" href="#%E7%84%B6%E5%90%8E%E5%AE%89%E8%A3%85Xmanager-%E5%90%AF%E5%8A%A8Xstart-%E5%9C%A8HOST%E5%A1%AB%E5%86%99LINUX%E7%9A%84IP%E5%9C%B0%E5%9D%80%EF%BC%8C%E9%80%89%E6%8B%A9SSH%E5%8D%8F%E8%AE%AE%EF%BC%8C%E7%94%A8%E6%88%B7%E5%90%8D%E5%92%8C%E5%AF%86%E7%A0%81%E4%B8%8ELINUX%E7%99%BB%E9%99%86%E4%B8%80%E6%A0%B7%EF%BC%8C%E9%80%89%E6%8B%A9%E7%94%A8%E6%88%B7%E7%95%8C%E9%9D%A2%EF%BC%8C%E5%9C%A8Command-%E4%B8%8B%E9%80%89%E6%8B%A9GNOME-%E6%88%91%E7%9A%84%E6%98%AFGNOME-%EF%BC%8C%E6%9C%80%E5%90%8ERUN%EF%BC%8C%E7%84%B6%E5%90%8E%E6%89%93%E5%BC%80Xshell-%E5%B0%B1%E8%83%BD%E5%A4%9F%E8%BF%9C%E7%A8%8B%E6%8E%A7%E5%88%B6LINUX%E4%BA%86"><span class="toc-number">2.0.1.</span> <span class="toc-text">然后安装Xmanager,启动Xstart 在HOST填写LINUX的IP地址，选择SSH协议，用户名和密码与LINUX登陆一样，选择用户界面，在Command 下选择GNOME  我的是GNOME ，最后RUN，然后打开Xshell 就能够远程控制LINUX了</span></a></li></ol></li></ol></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%AE%89%E8%A3%85Oracle-10g"><span class="toc-number">3.</span> <span class="toc-text">安装Oracle 10g</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E6%95%B0%E6%8D%AE%E5%BA%93%E7%9A%84%E5%90%AF%E5%8A%A8"><span class="toc-number">4.</span> <span class="toc-text">数据库的启动</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E9%85%8D%E7%BD%AEoracle%E5%BC%80%E6%9C%BA%E8%87%AA%E5%90%AF%E5%8A%A8%E5%AE%9E%E4%BE%8B%EF%BC%8C%E7%9B%91%E5%90%AC"><span class="toc-number">5.</span> <span class="toc-text">配置oracle开机自启动实例，监听</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#%E6%95%B0%E6%8D%AE%E5%BA%93%E5%B8%B8%E7%94%A8sql%E8%AF%AD%E5%8F%A5%E9%9B%86%E5%90%88"><span class="toc-number">5.1.</span> <span class="toc-text">数据库常用sql语句集合</span></a></li></ol></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E8%A7%A3%E5%86%B3oracle%E4%B8%8D%E8%83%BD%E4%B8%8A%E4%B8%8B%E7%BF%BB%E5%8E%86%E5%8F%B2%E5%91%BD%E4%BB%A4%E9%97%AE%E9%A2%98"><span class="toc-number">6.</span> <span class="toc-text">解决oracle不能上下翻历史命令问题</span></a></li></ol></div></div><div class="card-widget card-recent-post"><div class="item-headline"><i class="fas fa-history"></i><span>最新文章</span></div><div class="aside-list"><div class="aside-list-item"><a class="thumbnail" href="/posts/5880.html" title="docker-compose部署java前后端分离项目"><img src="https://img.alexcld.com/img/003219-15968179390168.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="docker-compose部署java前后端分离项目"/></a><div class="content"><a class="title" href="/posts/5880.html" title="docker-compose部署java前后端分离项目">docker-compose部署java前后端分离项目</a><time datetime="2022-01-17T07:02:14.000Z" title="发表于 2022-01-17 15:02:14">2022-01-17</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/posts/5877.html" title="jenkins多用户权限管理"><img src="https://img.alexcld.com/img/playpiano.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="jenkins多用户权限管理"/></a><div class="content"><a class="title" href="/posts/5877.html" title="jenkins多用户权限管理">jenkins多用户权限管理</a><time datetime="2022-01-17T06:51:58.000Z" title="发表于 2022-01-17 14:51:58">2022-01-17</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/posts/undefined.html" title="声明式pipeline在k8s中完成自动部署，回滚，钉钉通知"><img src="https://img.alexcld.com/img/catgirl.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="声明式pipeline在k8s中完成自动部署，回滚，钉钉通知"/></a><div class="content"><a class="title" href="/posts/undefined.html" title="声明式pipeline在k8s中完成自动部署，回滚，钉钉通知">声明式pipeline在k8s中完成自动部署，回滚，钉钉通知</a><time datetime="2021-12-10T03:24:28.000Z" title="发表于 2021-12-10 11:24:28">2021-12-10</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/posts/5876.html" title="jenkins自动部署版本回滚"><img src="https://img.alexcld.com/img/170734-15694024544d72.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="jenkins自动部署版本回滚"/></a><div class="content"><a class="title" href="/posts/5876.html" title="jenkins自动部署版本回滚">jenkins自动部署版本回滚</a><time datetime="2021-10-09T08:07:14.000Z" title="发表于 2021-10-09 16:07:14">2021-10-09</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/posts/9424.html" title="win10下使用linux"><img src="https://img.alexcld.com/img/090412-15573638521155.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="win10下使用linux"/></a><div class="content"><a class="title" href="/posts/9424.html" title="win10下使用linux">win10下使用linux</a><time datetime="2021-10-09T08:01:06.000Z" title="发表于 2021-10-09 16:01:06">2021-10-09</time></div></div></div></div></div></div></main><footer id="footer" style="background-image: url('https://img.alexcld.com/img/001127-160683908746c3.jpg')"><div id="footer-wrap"><div class="copyright">&copy;2020 - 2022 By Alex</div><div class="framework-info"><span>框架 </span><a target="_blank" rel="noopener" href="https://hexo.io">Hexo</a><span class="footer-separator">|</span><span>主题 </span><a target="_blank" rel="noopener" href="https://github.com/jerryc127/hexo-theme-butterfly">Butterfly</a></div><div class="footer_custom_text">alexclownfish</div></div></footer></div><div id="rightside"><div id="rightside-config-hide"><button id="readmode" type="button" title="阅读模式"><i class="fas fa-book-open"></i></button><button id="translateLink" type="button" title="简繁转换">简</button><button id="darkmode" type="button" title="浅色和深色模式转换"><i class="fas fa-adjust"></i></button><button id="hide-aside-btn" type="button" title="单栏和双栏切换"><i class="fas fa-arrows-alt-h"></i></button></div><div id="rightside-config-show"><button id="rightside_config" type="button" title="设置"><i class="fas fa-cog fa-spin"></i></button><button class="close" id="mobile-toc-button" type="button" title="目录"><i class="fas fa-list-ul"></i></button><button id="chat_btn" type="button" title="rightside.chat_btn"><i class="fas fa-sms"></i></button><a id="to_comment" href="#post-comment" title="直达评论"><i class="fas fa-comments"></i></a><button id="go-up" type="button" title="回到顶部"><i class="fas fa-arrow-up"></i></button></div></div><div id="local-search"><div class="search-dialog"><div class="search-dialog__title" id="local-search-title">本地搜索</div><div id="local-input-panel"><div id="local-search-input"><div class="local-search-box"><input class="local-search-box--input" placeholder="搜索文章" type="text"/></div></div></div><hr/><div id="local-search-results"></div><span class="search-close-button"><i class="fas fa-times"></i></span></div><div id="search-mask"></div></div><div><script src="/js/utils.js"></script><script src="/js/main.js"></script><script src="/js/tw_cn.js"></script><script src="https://cdn.jsdelivr.net/npm/node-snackbar/dist/snackbar.min.js"></script><script src="/js/search/local-search.js"></script><div class="js-pjax"><script>function loadValine () {
  function initValine () {
    const valine = new Valine(Object.assign({
      el: '#vcomment',
      appId: 'rdtTOtMkfivtPvkQaaDXmJUd-gzGzoHsz',
      appKey: 'E68vw0GUqAynKmIiHtw9FLRA',
      placeholder: '留下你的看法吧！！',
      avatar: 'monsterid',
      meta: 'nick,mail,link'.split(','),
      pageSize: '10',
      lang: 'zh-CN',
      recordIP: true,
      serverURLs: '',
      emojiCDN: '',
      emojiMaps: "",
      enableQQ: true,
      path: window.location.pathname,
      requiredFields: ["nick,mail"],
      visitor: false
    }, null))
  }

  if (typeof Valine === 'function') initValine() 
  else getScript('https://cdn.jsdelivr.net/npm/valine/dist/Valine.min.js').then(initValine)
}

if ('Valine' === 'Valine' || !false) {
  if (false) btf.loadComment(document.getElementById('vcomment'),loadValine)
  else setTimeout(loadValine, 0)
} else {
  function loadOtherComment () {
    loadValine()
  }
}</script></div><script src="https://cdn.jsdelivr.net/npm/vue@2.6.11"></script><script src="https://cdn.jsdelivr.net/npm/butterfly-extsrc@1/dist/activate-power-mode.min.js"></script><script>POWERMODE.colorful = true;
POWERMODE.shake = true;
POWERMODE.mobile = false;
document.body.addEventListener('input', POWERMODE);
</script><script id="click-show-text" src="https://cdn.jsdelivr.net/npm/butterfly-extsrc@1/dist/click-show-text.min.js" data-mobile="false" data-text="I,LOVE,YOU" data-fontsize="15px" data-random="false" async="async"></script><script async data-pjax src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script></div><!-- hexo injector body_end start -->
  <script data-pjax src="https://cdn.jsdelivr.net/gh/Zfour/hexo-github-calendar@1.21/hexo_githubcalendar.js"></script>
  <script data-pjax>
        function GithubCalendarConfig(){
            var git_githubapiurl ="https://python-github-calendar-api.vercel.app/api?alexclownfish";
            var git_color =['#ebedf0', '#fdcdec', '#fc9bd9', '#fa6ac5', '#f838b2', '#f5089f', '#c4067e', '#92055e', '#540336', '#48022f', '#30021f'];
            var git_user ="alexclownfish";
            var parent_div_git = document.getElementById('recent-posts');
            var git_div_html = '<div class="recent-post-item" style="width:100%;height:auto;padding:10px;"><div id="github_loading" style="width:10%;height:100%;margin:0 auto;display: block"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"  viewBox="0 0 50 50" style="enable-background:new 0 0 50 50" xml:space="preserve"><path fill="#d0d0d0" d="M25.251,6.461c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615V6.461z" transform="rotate(275.098 25 25)"><animateTransform attributeType="xml" attributeName="transform" type="rotate" from="0 25 25" to="360 25 25" dur="0.6s" repeatCount="indefinite"></animateTransform></path></svg></div><div id="github_container"></div></div>';
            if(parent_div_git && location.pathname =='/'){
                console.log('已挂载github calendar')
                // parent_div_git.innerHTML=git_div_html+parent_div_git.innerHTML // 无报错，但不影响使用(支持pjax跳转)
                parent_div_git.insertAdjacentHTML("afterbegin",git_div_html) // 有报错，但不影响使用(支持pjax跳转)
            };
            GithubCalendar(git_githubapiurl,git_color,git_user)
        }
        if(document.getElementById('recent-posts')){
            GithubCalendarConfig()
        }
    </script>
    <style>#github_container{min-height:280px}@media screen and (max-width:650px) {#github_container{background-image:;min-height:0px}}</style>
    <style></style><!-- hexo injector body_end end --><script src="/live2dw/lib/L2Dwidget.min.js?094cbace49a39548bed64abff5988b05"></script><script>L2Dwidget.init({"model":{"jsonPath":"/live2dw/assets/tororo.model.json"},"display":{"position":"left","width":150,"height":300},"mobile":{"show":true},"log":false,"pluginJsPath":"lib/","pluginModelPath":"assets/","pluginRootPath":"live2dw/","tagMode":false});</script></body></html>